//TODO: Create a scripot to seed the categories

import { db } from "@/db";
import { categories } from "@/db/schema";


const categoryNames = [
  "汽车和车辆",
  "喜剧",
  "教育",
  "游戏",
  "娱乐",
  "电影和动画",
  "How-to and Style",
  "音乐",
  "新闻与政治",
  "博客",
  "宠物与动物",
  "科学技术",
  "运动",
  "旅游及活动",
];

async function main() {
  console.log("Seeding categories...");
  try {
    const values = categoryNames.map((name) => ({ name, description: `相关视频 ${name.toLowerCase()}` }));
    await db.insert(categories).values(values);
    console.log("Categories seeded successfully.");
  } catch (error) {
    console.error("Error seeding categories:", error);
    process.exit(1);
  }
}

main();